package com.example.demo.lock;

import org.springframework.stereotype.Service;

import java.util.concurrent.atomic.AtomicInteger;

@Service
public class LockTest {

    private AtomicInteger count = new AtomicInteger(0);
    public static int aa = 0;


    @RedissonLock(key = "1")
    public void abc(Long uid){
        count.incrementAndGet();
        aa++;
        System.out.println("分布式锁测试abc ：=========>"+count);
        System.out.println("分布式锁测试aa ：=========>"+aa);
    }
}
